---
title: "p8105_hw6_jh3909"
author: "Jingxuan He(UNI: jh3909),
Yue Pan (UNI: )"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(janitor)
library(stringr)
library(forcats)
library(viridis)
library(plotly)
library(tidytext)
theme_set(theme_bw())
# Make some noisily increasing data
set.seed(955)
dat <- data.frame(cond = rep(c("A", "B"), each=10),
xvar = 1:20 + rnorm(20,sd=3),
yvar = 1:20 + rnorm(20,sd=3))
```
```{r}
set.seed(1)
NYC_restaurant_data = read_csv("DOHMH_New_York_City_Restaurant_Inspection_Results.csv.gz", col_types = cols(building = col_character()),
na = c("NA", "N/A")) %>%
filter(grade %in% c("A", "B", "C")) %>%
mutate(inspection_num = row_number(),
boro = str_to_title(boro)) %>%
filter(boro !="Missing") %>%
select(inspection_num, boro, grade, score, critical_flag, dba, cuisine_description, zipcode, violation_description, inspection_date)
```
Row
-----------------------------------------------------------------------
### Chart A
```{r}
## histrogram of the number of restaurants in each boro
NYC_restaurant_data %>%
count(boro) %>%
mutate(boro = fct_reorder(boro, n)) %>%
plot_ly(y = ~n, color = ~boro, type = "bar") %>%
layout(xaxis = list(title = "Boro"), yaxis = list(title = "Count"))
```
### Chart B
```{r}
# make a box plot; x = cuisine_descirption; y= score
```
Row
-----------------------------------------------------------------------
### Chart C
```{r}
# density plot that shows the number of rows for each inspection date
# NYC_restaurant_data %>%
# plot_ly(x = ~inspection, y = ~n, color = ~neighbourhood, type = "bar")
```
### Chart D
```{r}
# Sentiment Plot
```